ci: upgrade npm in release workflow for Trusted Publishing#3
Merged
stevensacks merged 1 commit intomainfrom Apr 27, 2026
Merged
ci: upgrade npm in release workflow for Trusted Publishing#3stevensacks merged 1 commit intomainfrom
stevensacks merged 1 commit intomainfrom
Conversation
Node 22 ships npm 10.x. npm 10 signs provenance attestations but does not exchange the GitHub OIDC token for a short-lived publish token, so PUTs to the registry go without auth and return 404 even when a trusted publisher is correctly configured. npm 11.5.1+ does the exchange. Installing npm@latest before the publish step unblocks it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
stevensacks
added a commit
that referenced
this pull request
Apr 27, 2026
PR #3 added `npm install -g npm@latest` but it failed at runtime with MODULE_NOT_FOUND on promise-retry — a well-known npm self-upgrade bootstrap bug where modules unload mid-rebuild. `--force` skips the problematic rebuild step. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
npm install -g npm@lateststep before the changesets publish step.Why
Trusted Publishing requires the npm CLI to exchange the GitHub OIDC token for a short-lived publish token. That codepath landed in npm 11.5.1. Earlier npm versions (Node 22 ships npm 10) sign provenance attestations but skip the OIDC exchange, so the actual
PUT https://registry.npmjs.org/<pkg>request goes without auth and the registry returns 404 — even when the trusted publisher is correctly configured.Symptom we hit on the v1.1.0 publish:
```
npm notice publish Signed provenance statement
npm notice publish Provenance statement published to transparency log
npm error 404 Not Found - PUT https://registry.npmjs.org/@gaia-react%2flint
```
🤖 Generated with Claude Code